This invention relates to a distributed processing system in which one or more client machines (client nodes) and a server machine (server node) are connected through a network, a client node and a server node constituting such distributed processing system, and a distributed processing method in such distributed processing system.
There has been a use of a client server system for distributed processing wherein a server node and a client node (which are collectively called simply a node) are connected through a network, for example the Internet. In the past, in order for a server node to request a client node to do processing (i.e., a task) and obtain the result of the task in such a client server system, one of two methods was employed. In a first method, all tasks were executed in the server node side and the result of the task was returned to the client node. In an alternative, second method, a task program (application program) was sent from the server node to the client node through a network and the client node side executed the application program to obtain the result of the task.
In the first method, however, all tasks had to be processed in the server node so that the processing load in the server node became excessively heavy resulting in a prolonged response time before the result of the task was returned to the client node. In the second method, on the other hand, the processing capability of the client node in hardware and software aspects was generally lower than the processing capability of the server node, also resulting in a prolonged response time until the result of the task was obtained.
To avoid such disadvantages, it is desirable to distribute the processing load between the nodes. As to distribution of processing load in such client server system, PUPA 4-80858 (reference 1), PUPA 5-128029 (reference 2) and PUPA 9-91231 (reference 3) are known, for example. However, the load distributing method disclosed in reference 1 simply transfers an application program from the server node to the client node for execution after preserving a required work area in the memory, so that the method is subject to the same disadvantage as the above second method. The load distributing method disclosed in reference 2 selects a client node which is most suitable for execution of the application program among a plurality of client nodes and sends the application program to the selected client node for execution. The reference 2 method has the same disadvantage as the load distribution method disclosed in the reference 1. Finally, in the load distributing method disclosed in the reference 3, because nodes which are capable of executing each of application programs have to be registered in advance, an extensive system modification as well as a large investment are required when applied to an existing client server system.
In view of the above described problems in the prior art, it is therefore an object of this invention to provide a distributed processing system and method which minimizes response time from the time when a client issues a task request to the time when the result of the task is obtained, by suitably distributing the load between a client node and a server node in a client server system in which the client node and the server node communicate with each other through a network.
It is another object of this invention to provide a distributed processing system (and method for using same) which is adapted to an existing client server system without requiring an extensive modification of the system and a large amount of investment, and which realizes a large reduction of response time.
For the purpose of achieving the above objectives, this invention provides a distributed processing system consisting of one or more client node(s) and server node(s) communicating with each other. In accordance with the invention, each of said client nodes comprises: task request means for requesting said server node to process a predetermined task; task program executing means for receiving a program for said requested predetermined task from said server node to execute in accordance with the content of a response signal returned from said server node in response to said request of predetermined task; and, task result acquiring means for receiving the result of execution of said program received from said server node or the result of said predetermined task by said server node to acquire the result of said predetermined task. The inventive server nodes each comprise: processing load measuring means for measuring the processing load of the server node; response means, responsive to the measured processing load of the server node for returning to each of said client nodes which requested said predetermined task at least said response signal which causes said predetermined task to be executed; program sending means for sending the program for said predetermined task to each of said client nodes when each of said client nodes requesting said predetermined task is caused to execute said predetermined task; and task executing means for executing said predetermined task and sending the result of execution to each of said client nodes when each of said client nodes requesting said predetermined task is not caused to execute said predetermined task.
Preferably, when the measured processing load of the server node is more than a preset value, the response means returns said response signal for executing said predetermined task to each of said client nodes, while said program sending means sends said program for the predetermined task to each of said client nodes.
Preferably, when the measured processing load of the server node is less than a preset value, said process executing means executes said predetermined task requested and sends the result of execution to each of said client nodes.
In the distributed processing system of this invention, the client nodes are connected to the server node through a network like the Internet and each communicates with the server node to request the server to process.
The server node receiving a request to process acquires a load ratio (processing load) of a CPU etc. of the server node from the operation system (OS) and, when the load ratio of the CPU etc. is lower than a preset value, executes the requested task and returns the result of the task to the client nodes which requested the task. On the other hand, when the load ratio of the CPU etc. is higher than the preset value, the server node sends the program (application program) which implements the requested task to each of client nodes for execution, thereby distributing the load between the client nodes and the server nodes.
In each client node, the task requesting means, responsive to a user manipulation for example, sends a task request signal requesting a search of a database (DB), task transaction or a file input/output (I/O) processing, etc., to the server node through the network.
The task program executing means is, for example, a Java virtual machine (Java VM) which executes an application program described in Java language in the WWW browser of the client node. When the response signal returned from the server node to the client node in response to said task request signal has a content to the effect that the client node is to perform database search etc., the task program executing means, upon transfer from the server node of the application program in Java language which implements said database search, executes the transferred application program thereby reducing the processing load of the server node.
The task result acquiring means, when performing said database search in the client node side, acquires the result of the task the application program by the task program executing means as a final result of the task while, when the server node side performed said database search, the task result acquiring means acquires the result of said database search done by the server node which is sent over the network as the final result of the task. The acquired result of the task is, for example, displayed in a monitor device or recorded in a recording medium.
In each server node, the processing load measuring means is, for example, a service call of the operation system (OS) and measures the load ratio of a CPU and the like as the processing load of the server node. When the load ratio measured by the processing load measuring means is larger than a preset value, the response means determines that the processing load of the server node is heavy and sends a response signal to the client node which requested said database search over the network to the effect that it will have the client node perform said database search.
The program sending means, when having the client node perform said database search, sends over the network an application program which implements the database search task to the client node which requested to process the database search.
The task executing means, when it does not have the client node which requested the database search executing the database search, (i.e., when the server node performs the database search), executes the requested database search and sends the result of execution to the requesting client node thereby contemplating to effectively use the server node which has a higher performance than the client node.
The client node of this invention comprises, in a distributed processing system including one or more client and server nodes communicating each other, task request means for requesting said server node to process a predetermined task, task program executing means for receiving a program for said requested predetermined task from said server node to execute it in accordance with the content of a response signal returned from said server node in response to said request of predetermined task, and task result acquiring means for receiving the result of execution of said program received from said server node or the result of said predetermined task by said server node to acquire the result of said predetermined task.
The server node of this invention comprises, in a distributed processing system including one or more client and server nodes communicating each other, processing load measuring means for measuring the processing load of the server node, response means responsive to the measured processing load of the server node for returning at least said response signal which causes said predetermined task to be executed to each of said client nodes which requested said predetermined task, program transfer means for transferring the program for said predetermined task to each of said client nodes when causing each of said client nodes requesting said predetermined task to execute said predetermined task, and process executing means for executing said predetermined task and sending the result of execution to each of said client nodes when not causing each of said client nodes requesting said predetermined task to execute said predetermined task.
The distributed processing method of this invention comprises, in a distributed processing system consisting of one or more client node(s) and server node(s) communicating each other, steps performed by each of said client nodes of; requesting said server node to process a predetermined task, receiving a program for said requested predetermined task from said server node for execution in accordance with the content of a response signal returned from said server node in response to said request of predetermined task, and receiving the result of execution of said program received from said server node or the result of said predetermined task by said server node to acquire the result of said predetermined task, and steps performed by said server nodes of; measuring the processing load of the server node, returning at least said response signal which causes said predetermined task to be executed to each of said client nodes which requested said predetermined task in response to the measured processing load of the server node, sending a program for said predetermined task to each of said client nodes when causing each of said client nodes requesting said predetermined task to execute said predetermined task, and executing said predetermined task and sending the result of execution to each of said client nodes when not causing each of said client nodes requesting said predetermined task to execute said predetermined task.